package lambda;

import org.junit.Test;
import pojo.Person;

import java.util.Arrays;
import java.util.List;

/**
 * @author Liu Huan
 */

public class MethodReference {
    @Test
    public void testSayHello(){
        List<String> list = Arrays.asList("zhao", "sun");
        list.forEach(Person::sayHello);
        list.forEach(str -> Person.sayHello(str));
    }
}
